Open
Conversation
- Fixed an error where the application failed to load a CSS asset, resulting in the error:
`tomt_bevycss::system: Failed to load stylesheet from handle StrongHandle<StyleSheetAsset>{ id: Index(AssetIndex { generation: 0, index: 0 }), path: Some(sheets/index.css) }`.
The issue was related to the loading order of systems. Moving the entire schedule right after the update phase resolved the problem.
- Make hot reload enabled when Bevy has the file_watcher feature enabled.
- Updated the alpha demo: due to commit bevyengine/bevy#14017, an image can now have a BackgroundColor. The fix ensures alpha is adjusted based on the component combination: if an entity has a UIImage component, the alpha is set on it; if not, the BackgroundColor component is updated.
Owner
|
Been evaluating this commit and the update to bevy 0.14 appears to have broken some UI layout (at least on For now I'm tempted to accept this proposal, and crack on with continuing to catch up on the bevy version (the issue might fix if the source is a bevy UI bug, or just as bevy UI changes more in future crates). I've opened an issue myself for creating a HTML reference of each example. With a reference to compare against, I can look at making sure the CSS is being applied accurately (and preventing future updates causing UI changes). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I bumped Bevy to 0.14.
Since 0.14 Bevy no longer re-exports
thiserror, I added it to the crate dependencies. Additionally, Bevy has changed how theBackgroundColorcomponent works.BackgroundColorno longer tints the color of images inImageBundle. I updated the alpha demo so that alpha is adjusted based on the component combination: if an entity has aUIImagecomponent, the color is set on it; if not, theBackgroundColorcomponent is updated.I added support for
border-colorandborder-radiusproperties, and renamedbordertoborder-widthto keep things consistent.I also simplified the usage of hot reload. It is now enabled automatically when Bevy's
file_watcherfeature is enabled. As a result, I removed thehot_reloadexample since it is no longer needed.There was a bug (I think only in 0.14) where the game occasionally failed to load a CSS asset at startup, resulting in the following error:
This issue was related to the loading order of systems. Moving the entire schedule right after the update phase resolved the problem. I adapted this fix from the zmbush fork, and I think it would be nice to credit her in the README.
With these changes and minor fixes in the crate code, all examples now run successfully.